#__Author:Administrator
#__Date:2019/7/19
from src import models
user_obj = None

def login():
    global user_obj
    user = str(input("登录用户>>"))
    pwd = str(input("用户密码>>"))
    obj = models.Student()
    user_obj = obj.login(user, pwd)
    if user_obj:
        print("欢迎%s" % user)
        user_obj = obj
    else:
        print("登录失败")

def attend_class():
    obj = models.Classes.get_all_list()
    for k, v in obj:
        print(k, v)
    choice = int(input("选择班级>>"))
    try:
        classesNid = obj[choice - 1]
    except IndexError:
        print("选项不存在")
    else:
        user_obj.create_teacher(classesNid)
        classesNid.income(100)

def show_classes_info():
    user_obj.show_classes_info

def set_score():
    umber = int(input("输入分数>>"))
    user_obj.